package behavioral_pattern.Interpreter_pattern;

/**
 * and解释：非终结符表达式
 */
public class AndNode extends AbstractMode {


    private AbstractMode left;//and的左表达式
    private AbstractMode right;//and的右表达式

    public AndNode(AbstractMode left, AbstractMode right) {
        this.left = left;
        this.right = right;
    }

    @Override
    public String interpret() {
        return left.interpret() +"再"+right.interpret();
    }
}
